/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.arc.level;

import com.jme3.app.Application;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.shape.Box;

/**
 *
 * @author Adam
 */
class NetworkedGeometryFactory {
    public static NetworkedGeometry generateFromGeometry(Geometry geom){
        NetworkedGeometry nGeom = new NetworkedGeometry(geom){
            @Override
            public Geometry toGeometry(Application app) {
                Box test = new Box(1f, 1f, 1f);
                Material tMat = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
                tMat.setColor("Color", ColorRGBA.Blue);
                Geometry geom = new Geometry(getName(), test);
                geom.setMaterial(tMat);
                return geom;
            }           
        };
                
        return nGeom;
    }
}
